
Version:=0.91
ModuleName:=havp

Objcet:=$(ModuleName).tgz
ObjectDir:=$(ModuleName)-$(Version)
ObjcetSource:=$(ModuleName)-$(Version).tar.gz

DependFiles:=
InstaEtcDir:=usr/local/etc
InstaLibDir:=usr/lib
InstaSbinDir:=usr/local/sbin

InstallDirTmp:=usr/local/
InstallDir:=/$(InstallDirTmp)
ManDir:=/tmp

Config:=./configure --disable-trophie --prefix=$(InstallDir) --disable-locking --disable-ssl-tunnel

Patch:=patch -p0 < havp.patch

.PHONY: all clean dist_clean

all:$(Objcet) 

$(Objcet):$(ObjcetSource) havp.config
	tar -xzf $(ObjcetSource)
	#$(Patch)
	cd $(ObjectDir); $(Config)
	$(MAKE) -C $(ObjectDir)
	$(MAKE) -C $(ObjectDir) install DESTDIR=`pwd`/
	mkdir -p $(InstaLibDir)
	cp -af /usr/lib/libstdc++.so.6* /lib/libgcc_s.so.1 $(InstaLibDir)
	cp -rf havp.config  $(InstallDirTmp)/etc/havp/
	cd $(InstallDirTmp)/etc//havp/templates/; rm -rf br de es fr it nl pf pl ru sv
	$(g_STRIP)
	tar -czf $(Objcet) usr

clean:
	rm -rf $(Objcet) usr var etc

dist_clean:clean
	rm -rf $(ObjectDir) $(ObjcetSource) 
	
include ../Makefile.Res
